package com.kuang.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@ResponseBody //给所有的方法允许返回字符串
@Controller //注册为控制器
public class IndexController {

    @RequestMapping("/") //这是url http://127.0.0.1:8081/
    public String index(){
        return "this is index!";
    }
}
